package com.crealth.model;

import java.io.Serializable;
import java.sql.Timestamp;

import com.alibaba.fastjson.JSONObject;

public class StaffDayKPIModel implements Serializable {
	private static final long serialVersionUID = 2817025L;
	
	private long id;
	private int userID;
	private Timestamp curDay;
	private int addPurpose;
	private int callSum;
	private int holdSum;
	private int gtOneSecond;
	private int holdSumTime;
	private int meetNum;
	private int signedNum; //  签约数
	private String signedConsumerIDs;  // 签约的客户 id
	private int extendLoanNum;  // 放款
	private String extendLoanConsumerIDs;  // 放款的客户 id
	private int followupNum;  // 回访量
	
	public StaffDayKPIModel() {
		userID = 0;
		curDay = null;
		addPurpose = 0;
		callSum = 0;
		holdSum = 0;
		gtOneSecond = 0;
		holdSumTime = 0;
		meetNum = 0;
		signedNum = 0;
		signedConsumerIDs = "";
		extendLoanNum = 0;
		extendLoanConsumerIDs = "";
		followupNum = 0;
	}
	
	public StaffDayKPIModel(int uID) {
		userID = uID;
		curDay = null;
		addPurpose = 0;
		callSum = 0;
		holdSum = 0;
		gtOneSecond = 0;
		holdSumTime = 0;
		meetNum = 0;
		signedNum = 0;
		signedConsumerIDs = "";
		extendLoanNum = 0;
		extendLoanConsumerIDs = "";
		followupNum = 0;
	}
	
	public int getExtendLoanNum() {
		return extendLoanNum;
	}
	public void setExtendLoanNum(int extendLoanNum) {
		this.extendLoanNum = extendLoanNum;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public int getUserID() {
		return userID;
	}
	public void setUserID(int userID) {
		this.userID = userID;
	}
	public Timestamp getCurDay() {
		return curDay;
	}
	public void setCurDay(Timestamp curDay) {
		this.curDay = curDay;
	}
	public int getAddPurpose() {
		return addPurpose;
	}
	public void setAddPurpose(int addPurpose) {
		this.addPurpose = addPurpose;
	}
	public int getCallSum() {
		return callSum;
	}
	public void setCallSum(int callSum) {
		this.callSum = callSum;
	}
	public int getHoldSum() {
		return holdSum;
	}
	public void setHoldSum(int holdSum) {
		this.holdSum = holdSum;
	}
	public int getGtOneSecond() {
		return gtOneSecond;
	}
	public void setGtOneSecond(int gtOneSecond) {
		this.gtOneSecond = gtOneSecond;
	}
	public int getHoldSumTime() {
		return holdSumTime;
	}
	public void setHoldSumTime(int holdSumTime) {
		this.holdSumTime = holdSumTime;
	}
	public int getMeetNum() {
		return meetNum;
	}
	public void setMeetNum(int meetNum) {
		this.meetNum = meetNum;
	}
	public int getSignedNum() {
		return signedNum;
	}
	public void setSignedNum(int signedNum) {
		this.signedNum = signedNum;
	}	
	public int getFollowupNum() {
		return followupNum;
	}
	public void setFollowupNum(int followupNum) {
		this.followupNum = followupNum;
	}	
	public String getSignedConsumerIDs() {
		return signedConsumerIDs;
	}
	public void setSignedConsumerIDs(String signedConsumerIDs) {
		this.signedConsumerIDs = signedConsumerIDs;
	}
	public String getExtendLoanConsumerIDs() {
		return extendLoanConsumerIDs;
	}
	public void setExtendLoanConsumerIDs(String extendLoanConsumerIDs) {
		this.extendLoanConsumerIDs = extendLoanConsumerIDs;
	}
	public JSONObject toJSONObject() {
		JSONObject resJson = new JSONObject();
		resJson.put("ID", id);
		resJson.put("userID", userID);
		//long nday = curDay.getTime() / 1000;
		//resJson.put("curDay", nday);
		resJson.put("addPurpose", addPurpose);
		resJson.put("callSum", callSum);
		resJson.put("holdSum", holdSum);
		resJson.put("gtOneSecond", gtOneSecond);
		resJson.put("holdSumTime", holdSumTime);
		resJson.put("meetNum", meetNum);
		resJson.put("signedNum", signedNum);
		resJson.put("extendLoanNum", extendLoanNum);
		resJson.put("followupNum", followupNum);
		if (signedConsumerIDs != null && signedConsumerIDs.length() > 0) {
			resJson.put("signedConsumerIDs", signedConsumerIDs);
		}
		if (extendLoanConsumerIDs != null && extendLoanConsumerIDs.length() > 0) {
			resJson.put("extendLoanConsumerIDs", extendLoanConsumerIDs);
		}
		
		return resJson;
	}

}
